#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <mythread.h>

#include "formvideo.h"
#include "formwelcom.h"
#include <opencv2/opencv.hpp>
#include <QLabel>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();


private slots:
    void lblShow(QString num);
    void switchForm();

private:

    Ui::MainWindow *ui;
    FormVideo *formVideo;
    FormWelcom *formWelcom;


    int timeNum;
    TestThread *testThread;  //线程对象
    TestThread *testThread1;

    QPoint globalPos;
    QSize basicSize;
    bool pressed = false;
    bool canMove = false;
    uchar moveType = 0;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent*) override;
    void LabelDisplayMat(QLabel *label, cv::Mat &mat);
    void opencvTest();


};
#endif // MAINWINDOW_H
